from skimage import data
from matplotlib import pyplot as plt
image=data.coffee()  #�������ͼ��
ratio=128                #������������
for i in range(image.shape[0]):
    for j in range(image.shape[1]):
        for k in range(image.shape[2]):
            image[i][j][k]=int(image[i][j][k]/ratio)*ratio
            #��ͼ��ÿ�����ؽ�������
plt.imshow(image)#��ӡ������ͼ��ͼ��
plt.show()
''''''